import request from '@/utils/request'

//统一字典下拉框查询
export function adminDict(params) {
    return request({
        url: `common/v1/adminDict`,
        method: 'get',
        params
    })
}
//查询平台优惠券列表
export function couponList(params) {
    return request({
        url: `/platform/coupon/list`,
        method: 'get',
        params
    })
}
//领券明细 统计
export function couponStatistics(params) {
    return request({
        url: `/customer/platform/coupon/statistics`,
        method: 'get',
        params
    })
}
//领券明细列表
export function couponReceiveLs(params) {
    return request({
        url: `/customer/platform/coupon/list`,
        method: 'get',
        params
    })
}
//用券明细列表
export function useCouponLs(params) {
    return request({
        url: `/customer/platform/coupon/useList`,
        method: 'get',
        params
    })
}
//新增平台优惠券
export function addCoupon(data) {
    return request({
      url: '/platform/coupon',
      method: 'post',
      data
    })
}
//获取平台优惠券详情
export function couponInfo(params) {
    return request({
        url: `/platform/coupon/getInfo`,
        method: 'get',
        params
    })
}
//编辑平台优惠券
export function couponEdit(data) {
    return request({
      url: '/platform/coupon',
      method: 'put',
      data
    })
}
//查询行业类型
export function shopTypeList(params) {
    return request({
        url: `/common/v1/shopTypeListAll`,
        method: 'get',
        params
    })
}
//查询店铺
export function shopSelectDown(params) {
    return request({
        url: `/common/v1/shop/select`,
        method: 'get',
        params
    })
}
//复制领券中心链接
export function getUrl(params) {
    return request({
        url: `/platform/coupon/getUrl`,
        method: 'get',
        params
    })
}
//复制详情链接
export function getDetailUrl(params) {
    return request({
        url: `/platform/coupon/getDetailUrl`,
        method: 'get',
        params
    })
}